var _store;
var _sort;
Ext.onReady(function(){
		var _columnModle = new Ext.grid.ColumnModel({
	 		columns:[
	 		{
	 			header: "环节",dataIndex:'description',sortable : true
	 		},
	 		{
	 			header: "默认常用语", menuDisabled: false,dataIndex:'handler',renderer:function(s,m,rec){
	 				var str = "<a href=\"" +Ext.get('basePath').getValue()+ "system/changyongyudefalt.jsp?description="+rec.data.description+"&id="+rec.data.id+"\">默认常用语</a>";
	 				return str;
	 			}
 			},
 			{
	 			header: "个人常用语", menuDisabled: false,dataIndex:'handler',renderer:function(s,m,rec){
	 				var str = "<a href=\"" +Ext.get('basePath').getValue()+ "system/changyongyuperson.jsp?description="+rec.data.description+"&id="+rec.data.id+"\">个人常用语</a>";
	 				return str;
	 			}
	 		}
	 		]
	 	});
		_store = new Ext.data.JsonStore({
	 		fields:['id','description','description','description','description','description'],
	 		url: Ext.get('basePath').getValue()+'tjsinfo/tjsoa/system/changyong.do?method=queryAll',
	 		root: 'root',
            totalProperty: 'totalProperty'

	 	});

	

		var _table = new Ext.grid.GridPanel({
			colModel:_columnModle,
			sm: new Ext.grid.RowSelectionModel({singleSelect:true}),
	 		store:_store,
		    width: Ext.get("showRegional").getWidth(),
		    height:Ext.get("showRegional").getHeight(),
		    title: _title,
		    renderTo:Ext.get('showRegional'),
		    frame: true,
		    viewConfig:{
		    	forceFit: true
		    },
		    clicksToEdit:1, 
		    layout : 'fit',// 表格内列内容填充满,按列头比例填充 
		    loadMask:{ 
			msg : '数据加载中，请稍后...' 
			}, 
		    stripeRows:true
		});
		_store.load();	
});


 function windowonload(){
         if (_sessionUser==null){
    	    Ext.MessageBox.alert('提示', '请先登录',clickLink);     
         }
        }
        
function clickLink(){
		window.location.href='';
	}		
		